package com.lwg.vhr.utils;

import com.lwg.vhr.model.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author: lwg
 * @Date: 2021/8/18 22:03
 * @Description: 获取当前用户信息工具类
 */
public class HrUtils {

    public static Hr getCurrentHr(){
        return (Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
